#include <iostream>

using ll = long long;
ll const maxn = 1000000000;

ll guassx()
{
    int opt = 0;
    int l = 0, r = maxn;
    while (l != r) {
        std::cout << l << " 0\n";
        std::cin >> opt;
        std::cout << r << " 0\n";
        std::cin >> opt;
        int mid = (l + r) / 2;
        if (opt == 1) l = mid + 1;
        else r = mid;
    }
    return l;
}

ll guassy()
{
    int opt = 0;
    int l = 0, r = maxn;
    while (l != r) {
        std::cout << "0 " << l << "\n";
        std::cin >> opt;
        std::cout << "0 " << r << "\n";
        std::cin >> opt;
        int mid = (l + r) / 2;
        if (opt == 1) l = mid + 1;
        else r = mid;
    }
    return l;
}

int main()
{
    std::ios_base::sync_with_stdio(false);
    ll x = guassx();
    ll y = guassy();
    std::cout << "A " << x << " " << y << "\n";
}

